﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Login.ascx.cs" Inherits="KimSoft.UI.Controls.Login" %>

<asp:LoginView ID="LoginView1" runat="server">
    <AnonymousTemplate>
       <asp:Login ID="Login" runat="server" Width="100%" FailureAction="RedirectToLoginPage" DestinationPageUrl="~/Admin/Default.aspx" >
          <LayoutTemplate>
             <table border="0" cellpadding="5" cellspacing="5" width="100%">
                <tr>
                   <td width="100px"><asp:Label runat="server" ID="lblUserName" AssociatedControlID="UserName" Text="Tên đăng nhập :" /></td>
                   <td><asp:TextBox id="UserName" runat="server" Width="95%" meta:resourcekey="UserNameResource2" /></td>
                   <td width="5px" align="right">
                      <asp:RequiredFieldValidator ID="valRequireUserName" runat="server" SetFocusOnError="True"
                         ControlToValidate="UserName" Text="*" ValidationGroup="Login" />
                   </td>
                </tr>
                <tr>
                   <td><asp:Label runat="server" ID="lblPassword" AssociatedControlID="Password" Text="Mật khẩu :" /></td>
                   <td><asp:TextBox ID="Password" runat="server" TextMode="Password"  Width="95%" /></td>
                   <td align="right">
                      <asp:RequiredFieldValidator ID="valRequirePassword" runat="server" SetFocusOnError="True"
                         ControlToValidate="Password" Text="*" ValidationGroup="Login" />
                   </td>
                </tr>
                <tr>
                   <td><asp:CheckBox ID="RememberMe" runat="server" Text="Ghi nhớ" ></asp:CheckBox></td>
                   <td align="right">
                      <asp:ImageButton ID="Submit" runat="server" AlternateText="Đăng nhập"
                         CommandName="Login" ImageUrl="~/Images/dangnhap.jpg" ValidationGroup="Login" />
                   </td>
                   <td align="right">&nbsp;</td>
                </tr>
             </table>
             <div style="border-top: solid 1px black; margin-top: 2px; padding-top: 2px">
                <asp:HyperLink ID="lnkPasswordRecovery" runat="server" NavigateUrl="~/PasswordRecovery.aspx" meta:resourcekey="lnkPasswordRecoveryResource1">Quên mật khẩu</asp:HyperLink>
             </div>
          </LayoutTemplate>
       </asp:Login>
    </AnonymousTemplate>
    <LoggedInTemplate>
       <div id="welcomebox">
          <asp:LoginName ID="LoginName1" runat="server" FormatString="Chào	{0}" /><br />
          <asp:HyperLink ID="lnkProfile" runat="server" Text="Cập nhật thông tin" NavigateUrl="~/EditProfile.aspx" /><br /> 
          <asp:LoginStatus ID="LoginStatus1" Runat="server" LogoutPageUrl="~/Default.aspx" 
               LogoutAction="Redirect" />
       </div>
    </LoggedInTemplate>
 </asp:LoginView>